<?php
/**
 * Add body classes if certain regions have content.
 */
function solveto_preprocess_html(&$vars) {
    global $base_url;
    $css = "";
    $themepath = drupal_get_path('theme','solveto');
    drupal_add_js(array('themePath' => $themepath),'setting');

    drupal_add_css($themepath . '/css/front/olw.carousel.css');
    drupal_add_css($themepath . '/css/front/css/bootstrap.css');

    drupal_add_css($themepath . '/css/front/css/eldo.css');
    drupal_add_css($themepath . '/css/front/css/flexslider.css');
    drupal_add_css($themepath . '/css/front/font-awesome.min.css');
    drupal_add_css($themepath . '/css/front/hoverex-all.css');
    drupal_add_css($themepath . '/css/front/idangerous.swiper.css');
    drupal_add_css($themepath . '/css/front/jquery.easy-pie-chart.css');
    drupal_add_css($themepath . '/css/front/odometer-theme-minimal.css');
    drupal_add_css($themepath . '/css/front/steadysets.css');
    drupal_add_css($themepath . '/css/front/linecon.css');
    drupal_add_css($themepath . '/css/front/vector-icons.css');
    drupal_add_css($themepath . '/css/front/style.css');
    drupal_add_css($themepath . '/css/front/bootstrap-responsive.css');

    
    drupal_add_css($themepath . '/libs/fancybox/source/jquery.fancybox.css');
    drupal_add_css($themepath . '/css/front/js_composer.css');
    drupal_add_css($themepath . '/css/front/drupal-additional.css');
$skin = theme_get_setting('skins');
    if($skin != null) {
        if($skin == 'custom') {
            $custom_color = theme_get_setting('skin_colorpicker');
            $css .= solveto_custom_skin($custom_color);
        } else {
            drupal_add_css($themepath . '/css/front/colors/'.$skin.'.css');
        }
    }
    drupal_add_js($themepath . '/js/admin/jquery-migrate-1.2.1.js');
    drupal_add_js($themepath . '/js/front/jquery.owl.carousel.js');
    drupal_add_js($themepath . '/js/front/jquery.easy-pie-chart.js');
    drupal_add_js($themepath . '/js/front/jquery.appear.js');
    drupal_add_js($themepath . '/js/front/modernizr.custom.66803.js');
    drupal_add_js($themepath . '/js/front/odometer.min.js');
    drupal_add_js($themepath . '/js/front/animations.js');

    drupal_add_js($themepath . '/js/front/bootstrap.min.js');
    drupal_add_js($themepath . '/js/front/jquery.easing.1.3.js');
    drupal_add_js($themepath . '/js/front/jquery.mobilemenu.js');
    drupal_add_js($themepath . '/js/front/isotope.js');
    drupal_add_js($themepath . '/js/front/layout-mode.js');
    drupal_add_js($themepath . '/js/front/masonry.pkgd.min.js');
    drupal_add_js($themepath . '/js/front/jquery.cycle.all.js');
    drupal_add_js($themepath . '/js/front/customSelect.jquery.min.js');
    drupal_add_js($themepath . '/js/front/jquery.flexslider-min.js');
    drupal_add_js($themepath . '/libs/fancybox/source/jquery.fancybox.js');
    drupal_add_js($themepath . '/libs/fancybox/source/helpers/jquery.fancybox-media.js');
    drupal_add_js($themepath . '/js/front/jquery.carouFredSel-6.1.0-packed.js');
    drupal_add_js($themepath . '/js/front/tooltip.js');
    drupal_add_js($themepath . '/js/front/jquery.hoverex.js');
    drupal_add_js($themepath . '/js/front/imagesloaded.pkgd.min.js');
    drupal_add_js($themepath . '/js/front/jquery.parallax.js');
    drupal_add_js($themepath . '/js/front/jquery.cookie.js');
    drupal_add_js($themepath . '/js/front/main.js');
    drupal_add_js($themepath . '/js/front/jquery.placeholder.min.js');
    drupal_add_js($themepath . '/js/front/jquery.livequery.js');
    drupal_add_js($themepath . '/js/front/jquery.countdown.min.js');
    drupal_add_js($themepath . '/js/front/waypoints.min.js');
    drupal_add_js($themepath . '/js/front/background-check.min.js');
    drupal_add_js($themepath . '/js/front/idangerous.swiper.min.js');
    drupal_add_js($themepath . '/js/front/jquery.infinitescroll.js');

///////////////////////////////////////// Construct page title //////////////////////////////////////////////////////.
    if (drupal_get_title()) {
        $head_title = array(
            'title' => str_replace(array('&lt;i&gt;','&lt;/i&gt;'),'',drupal_get_title()),
            'name' => check_plain(variable_get('site_name', 'Drupal')),
        );
    }
    else {
        $head_title = array('name' => check_plain(variable_get('site_name', 'Drupal')));
        if (variable_get('site_slogan', '')) {
            $head_title['slogan'] = filter_xss_admin(variable_get('site_slogan', ''));
        }
    }

    $vars['head_title_array'] = $head_title;
    $vars['head_title'] = implode(' | ', $head_title);

//////////////////////////////////////////// FAVICON SETTING ////////////////////////////////////////////
    // Add favicon.
    if (theme_get_setting('toggle_fvicon')) {
        $favicon_path = base_url().'/'.$themepath.'/favicon.ico';
        if(theme_get_setting('default_favicon') == 0) {
            if(module_exists('media')) {
                $favicon = theme_get_setting('fvicon_upload');
                if(!empty($favicon)) {
                    $file = json_decode($favicon);
                    $favicon_path = $file->url;
                }
            } else {
                if ($favicon_file = theme_get_setting('fvicon_file')) {
                    $favicon_path =  file_create_url(file_build_uri($logo_file));
                }
            }
        }
        $type = theme_get_setting('favicon_mimetype');
        drupal_add_html_head_link(array('rel' => 'shortcut icon', 'href' => drupal_strip_dangerous_protocols($favicon_path), 'type' => $type));
    }
    // iOs webclip
    // iOs webclip
    $vars['ios_57'] = '';
    if(module_exists('media')) {
        if(theme_get_setting('ios_57x57_media_file')) {
            $file_upload = theme_get_setting('ios_57x57_media_file');
            if(!empty($file_upload)) {
                $file = json_decode($file_upload);
                $vars['ios_57'] = $file->url;
            }
        }
    } else {
        if (theme_get_setting('ios_57x57_form_file')) {
            $vars['ios_57'] =  file_create_url(file_build_uri(theme_get_setting('ios_57x57_form_file')));
        }
    }

    $vars['ios_72'] = '';
    if(module_exists('media')) {
        if(theme_get_setting('ios_72x72_media_file')) {
            $file_upload = theme_get_setting('ios_72x72_media_file');
            if(!empty($file_upload)) {
                $file = json_decode($file_upload);
                $vars['ios_72'] = $file->url;
            }
        }
    } else {
        if (theme_get_setting('ios_72x72_form_file')) {
            $vars['ios_72'] =  file_create_url(file_build_uri(theme_get_setting('ios_72x72_form_file')));
        }
    }

    $vars['ios_114'] = '';
    if(module_exists('media')) {
        if(theme_get_setting('ios_114x114_media_file')) {
            $file_upload = theme_get_setting('ios_114x114_media_file');
            if(!empty($file_upload)) {
                $file = json_decode($file_upload);
                $vars['ios_114'] = $file->url;
            }
        }
    } else {
        if (theme_get_setting('ios_114x114_form_file')) {
            $vars['ios_114'] =  file_create_url(file_build_uri(theme_get_setting('ios_114x114_form_file')));
        }
    }

    $vars['ios_144'] = '';
    if(module_exists('media')) {
        if(theme_get_setting('ios_144x144_media_file')) {
            $file_upload = theme_get_setting('ios_144x144_media_file');
            if(!empty($file_upload)) {
                $file = json_decode($file_upload);
                $vars['ios_144'] = $file->url;
            }
        }
    } else {
        if (theme_get_setting('ios_144x144_form_file')) {
            $vars['ios_144'] =  file_create_url(file_build_uri(theme_get_setting('ios_144x144_form_file')));
        }
    }

//////////////////////////////////////////// Sidebar ////////////////////////////////////////////


    /* ----------------------------------------------- Menu ---------------------------------------------------------*/

    $vars['theme_setting_css'] = $css;


    // Enable Responsive
    if (theme_get_setting('responsive')) {
        $menuid = 'main-menu';
        if (!empty($vars['page']['superfish'])) {
            $tmp_array_keys = array_keys($vars['page']['superfish']);
            $menuid = str_replace("_","-",$tmp_array_keys[0]);
        }
        $selecnav = '(function ($) {
			$(function(){
				selectnav(\''.$menuid.'\', {
					label: \''.t('--- Table of content ---').'\',//first select field
					nested: true,
					indent: \'-\'
			 });
		});
		})(jQuery);';
        drupal_add_js($selecnav, 'inline');
        $vp = array(
            '#type' => 'html_tag',
            '#tag' => 'meta',
            '#attributes' => array(
                'name' =>  'viewport',
                'content' =>  'width=100%, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no'
            )
        );
        drupal_add_html_head($vp, 'viewport');
    }


    //Google Fonts
    if(theme_get_setting('googlewebfonts')) {
        drupal_add_css(theme_get_setting('googlewebfonts'),'external');
    }
    // Typekit
    if (theme_get_setting('typekit_id')) {
        drupal_add_js('http://use.typekit.net/'.theme_get_setting('typekit_id').'.js', 'external');
        drupal_add_js('try{Typekit.load();}catch(e){}', 'inline');
    }

    /* Text/typography
    ---------------------------------------------------------------------------------------- */
    $typography = '';
    // common text
    if (theme_get_setting('text_font') || theme_get_setting('ts_font_color')) {
        $typography = "body {";
        $typography .= solveto_font_to_css(theme_get_setting('text_font'));
        if (theme_get_setting('ts_font_color')) {
            $typography .= 'color: #' . theme_get_setting('ts_font_color') . ';';
        }
        $typography   .= "}\n";
    }
    /////
    $text_font_arr = explode("|", theme_get_setting('text_font'));
    if (count($text_font_arr) == 5 && $text_font_arr[0] != '0') {
        $typography   .= '#forum, ul.quicktabs-tabs, #nav ul.sf-menu li li,.ui-widget {font-family: '.$text_font_arr[4].';}';
    }
    /////
    // Text selection
    if (theme_get_setting('tss_bgcolor') || theme_get_setting('tss_tcolor')) {
        $tss_bgcolor = '';
        $tss_tcolor = '';
        if (theme_get_setting('tss_bgcolor')) {
            $tss_bgcolor   = 'background: #'.theme_get_setting('tss_bgcolor').';';
        }
        if (theme_get_setting('tss_tcolor')) {
            $tss_tcolor   = 'color: #'.theme_get_setting('tss_tcolor').';';
        }
        $typography   .= "::-moz-selection {". $tss_bgcolor . $tss_tcolor . "text-shadow: none;}\n";
        $typography   .= "::selection {" . $tss_bgcolor . $tss_tcolor. "text-shadow: none;}\n";
    }
    // link regular
    if (theme_get_setting('l_regular_color') || theme_get_setting('l_regular_st') || theme_get_setting('l_regular__hl') || theme_get_setting('l_regular_ts')) {
        $typography   .= "a:link, #node-title a {";
        if (theme_get_setting('l_regular_color')) {
            $typography   .= 'color: #'.theme_get_setting('l_regular_color').';';
        }
        if (theme_get_setting('l_regular__hl')) {
            $typography   .= 'background-color: #'.theme_get_setting('l_regular__hlc').';';
        }
        if(theme_get_setting('l_regular_st') == 1) {
            $typography .= 'text-decoration: line-through';
        }
        $l_text_style = theme_get_setting('l_regular_ts');
        if ($l_text_style['bold']) {
            $typography   .= 'font-weight: '.$l_text_style['bold'].';';
        }
        if ($l_text_style['italic']) {
            $typography   .= 'font-style: '.$l_text_style['italic'].';';
        }
        if ($l_text_style['underline']) {
            $typography   .= 'text-decoration: '.$l_text_style['underline'].';';
        }
        $typography   .= "}\n";
    }
    // link rollover
    if (theme_get_setting('l_rollover_color') || theme_get_setting('l_rollover_st') || theme_get_setting('l_rollover__hl') || theme_get_setting('l_rollover_ts')) {
        $typography   .= "a:hover, #node-title a:hover {";
        if (theme_get_setting('l_rollover_color')) {
            $typography   .= 'color: #'.theme_get_setting('l_rollover_color').';';
        }
        if (theme_get_setting('l_rollover__hl')) {
            $typography   .= 'background-color: #'.theme_get_setting('l_rollover__hlc').';';
        }
        if(theme_get_setting('l_rollover_st') == 1) {
            $typography .= 'text-decoration: line-through';
        }
        $l_text_style = theme_get_setting('l_rollover_ts');
        if ($l_text_style['bold']) {
            $typography   .= 'font-weight: '.$l_text_style['bold'].';';
        }
        if ($l_text_style['italic']) {
            $typography   .= 'font-style: '.$l_text_style['italic'].';';
        }
        if ($l_text_style['underline']) {
            $typography   .= 'text-decoration: '.$l_text_style['underline'].';';
        }
        $typography   .= "}\n";
    }

    // link visited
    if (theme_get_setting('l_visited_color') || theme_get_setting('l_visited_st') || theme_get_setting('l_visited__hl') || theme_get_setting('l_visited_ts')) {
        $typography   .= "a:visited, #node-title a:visited {";
        if (theme_get_setting('l_visited_color')) {
            $typography   .= 'color: #'.theme_get_setting('l_visited_color').';';
        }
        if (theme_get_setting('l_visited__hl')) {
            $typography   .= 'background-color: #'.theme_get_setting('l_visited__hlc').';';
        }
        if(theme_get_setting('l_visited_st') == 1) {
            $typography .= 'text-decoration: line-through';
        }
        $l_text_style = theme_get_setting('l_visited_ts');
        if ($l_text_style['bold']) {
            $typography   .= 'font-weight: '.$l_text_style['bold'].';';
        }
        if ($l_text_style['italic']) {
            $typography   .= 'font-style: '.$l_text_style['italic'].';';
        }
        if ($l_text_style['underline']) {
            $typography   .= 'text-decoration: '.$l_text_style['underline'].';';
        }
        $typography   .= "}\n";
    }

    // link on
    if (theme_get_setting('l_on_color') || theme_get_setting('l_on_st') || theme_get_setting('l_on_hl') || theme_get_setting('l_on_ts')) {
        $typography   .= "a:focus, a:active, #node-title a:focus, #node-title a:active {";
        if (theme_get_setting('l_on_color')) {
            $typography   .= 'color: #'.theme_get_setting('l_on_color').';';
        }
        if (theme_get_setting('l_on_hl')) {
            $typography   .= 'background-color: #'.theme_get_setting('l_on_hlc').';';
        }
        if(theme_get_setting('l_on_st') == 1) {
            $typography .= 'text-decoration: line-through';
        }
        $l_text_style = theme_get_setting('l_on_ts');
        if ($l_text_style['bold']) {
            $typography   .= 'font-weight: '.$l_text_style['bold'].';';
        }
        if ($l_text_style['italic']) {
            $typography   .= 'font-style: '.$l_text_style['italic'].';';
        }
        if ($l_text_style['underline']) {
            $typography   .= 'text-decoration: '.$l_text_style['underline'].';';
        }
        $typography   .= "}\n";
    }
    // Main menu
    if (theme_get_setting('typo_menu_style') || theme_get_setting('typo_menu_color')) {
        $typography   .= "#menu li{";
        if (theme_get_setting('text_font')) {
            $typography   .= solveto_font_to_css(theme_get_setting('typo_menu_style'));
        }

        if (theme_get_setting('typo_menu_color')) {
            $typography   .= 'color: #'.theme_get_setting('typo_menu_color').';';
        }
        $typography   .= "}\n";

        if (theme_get_setting('typo_menu_color')) {
            $typography   .= '#menu li a, #nav ul.sf-menu li a {color: #'.theme_get_setting('typo_menu_color').';}';
        }
        if (theme_get_setting('typo_menu_hover_color')) {
            $typography   .= '#menu li > a:hover,#menu li.sfHover > a, #main li:hover a {color: #'.theme_get_setting('typo_menu_hover_color').';}'."\n";
        }
        if (theme_get_setting('typo_menu_active_color')) {
            $typography   .= '#menu li > a:hover, #menu li.sfHover > a, #menu li a.active, #menu li.active a {color: #'.theme_get_setting('typo_menu_active_color').';}'."\n";
        }
    }
    /*-------------------------------------- Heading --------------------------------*/
    if(theme_get_setting('typo_heading_style_enable') == 1){
        for($i=1;$i<=6;$i++){
            $typography .= 'h'.$i.' {';
            if(theme_get_setting('typo_heading_h'.$i.'_style') || theme_get_setting('typo_heading_h'.$i.'_color')){
                if(theme_get_setting('typo_heading_h'.$i.'_style')){
                    $typography .= solveto_font_to_css(theme_get_setting('typo_heading_h'.$i.'_style'));
                }
                if(theme_get_setting('typo_heading_h'.$i.'_color')){
                    $typography .= ' color: #'.theme_get_setting('typo_heading_h'.$i.'_color').';';
                }
            }
            $typography .= "}\n";
        }
    }

    $vars['typography'] = $typography;

    /* Get theme settings
    ---------------------------------------------------------------------------------------- */
    $vars['footer_text']   = theme_get_setting('footer_text');
    $vars['header_code']   = theme_get_setting('header_code');
    $vars['footer_code']   = theme_get_setting('footer_code');
    if (theme_get_setting('custom_css')) {
        $vars['custom_css']  = theme_get_setting('custom_css');
    }
    drupal_add_css(path_to_theme() . '/css/ie7.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
    $vars['theme_setting_css'] = $css;
}
function solveto_font_to_css($font) {
    $font_arr = explode("|", $font);
    $css = "";
    if(count($font_arr) == 6) {
        if ($font_arr[0] != '0') {
            $css = ''.$font_arr[5].';';
        }
    }
    return $css;
}

function solveto_expand_font_weight($fw) {
    switch($fw) {
        case 'n1':
            $fontExpand = "font-style: normal; font-weight: 100;";
            break;
        case 'i1':
            $fontExpand = "font-style: italic; font-weight: 100;";
            break;
        case 'n2':
            $fontExpand = "font-style: normal; font-weight: 200;";
            break;
        case 'i2':
            $fontExpand = "font-style: italic; font-weight: 200;";
            break;
        case 'n3':
            $fontExpand = "font-style: normal; font-weight: 300;";
            break;
        case 'i3':
            $fontExpand = "font-style: italic; font-weight: 300;";
            break;
        case 'n4':
            $fontExpand = "font-style: normal; font-weight: normal;";
            break;
        case 'i4':
            $fontExpand = "font-style: italic; font-weight: normal";
            break;
        case 'n5':
            $fontExpand = "font-style: normal; font-weight: 500;";
            break;
        case 'i5':
            $fontExpand = "font-style: italic; font-weight: 500;";
            break;
        case 'n6':
            $fontExpand = "font-style: normal; font-weight: 600;";
            break;
        case 'i6':
            $fontExpand = "font-style: italic; font-weight: 600;";
            break;
        case 'n7':
            $fontExpand = "font-style: normal; font-weight: bold;";
            break;
        case 'i7':
            $fontExpand = "font-style: italic; font-weight: bold;";
            break;
        case 'n8':
            $fontExpand = "font-style: normal; font-weight: 800;";
            break;
        case 'i8':
            $fontExpand = "font-style: italic; font-weight: 800;";
            break;
        case 'n9':
            $fontExpand = "font-style: normal; font-weight: 800;";
            break;
        case 'i9':
            $fontExpand = "font-style: italic; font-weight: 800;";
            break;
        default:
            $fontExpand = "";
    }

    return $fontExpand;
}

/**
 * Override or insert vars into the page template for HTML osolveto
 */
function solveto_process_html(&$vars) {
    // Hook into color.module.
    if (module_exists('color')) {
        _color_html_alter($vars);
    }

    $classes = explode(' ', $vars['classes']);
    if ($node = menu_get_object()) {
        $node_type_class = drupal_html_class('node-type-' . $node->type);
        if (in_array($node_type_class, $classes)) {
            theme_get_setting('extra_page_classes') == 0 ? '' : $classes = str_replace($node_type_class, '', $classes);
            $classes = str_replace('node-type-', 'page-type-', $classes);
        }
    }
    $vars['classes'] = trim(implode(' ', $classes));
}


function solveto_check_und($param) {
    if (isset($param['und'])) {
        return $param['und'][0];
    } else {
        return $param[0];
    }
}
function solveto_custom_skin ($color) {
    $css = '
a,
a:hover,
a:visited,
a:active,
a:focus {
  color: '.$custom_color.';
}
.section-heading:before,
.section-heading:after,
.section-heading .tl,
.section-heading .tr,
.section-heading .br,
.section-heading .bl {
  border-color: '.$custom_color.';
}
.sub-heading:after {
  background-color: '.$custom_color.';
}
.button,
.button:hover,
.button:visited,
.button:focus,
.button:active {
  border-color: '.$custom_color.';
  color: '.$custom_color.';
}
.button.button-icon-clear:active,
.button.button-icon-clear.active,
.active > .button.button-icon-clear {
  color: '.$custom_color.' !important;
}
.button:active,
.button.active,
.active > .button {
  background-color: '.$custom_color.';
}
.button:not(.button-icon-clear):hover,
input:focus,
textarea:focus {
  -webkit-box-shadow: inset '.$custom_color.' 0 0 0 2px;
  -moz-box-shadow: inset '.$custom_color.' 0 0 0 2px;
  -ms-box-shadow: inset '.$custom_color.' 0 0 0 2px;
  -o-box-shadow: inset '.$custom_color.' 0 0 0 2px;
  box-shadow: inset '.$custom_color.' 0 0 0 2px;
}
.button-inverted:active {
  color: '.$custom_color.' !important;
}
.button-big .icon {
  border-right-color: '.$custom_color.';
}
blockquote {
  color: '.$custom_color.';
}
pre,
code,
kbd {
  background-color: '.$custom_color.';
}
input,
textarea {
  border-color: '.$custom_color.';
}
.colored,
.colored:hover,
.colored:visited,
.colored:focus,
.colored:active {
  color: '.$custom_color.' !important;
}
.coloredbg {
  background: '.$custom_color.' !important;
}
/* Navigation */
.navbar li.active > a > span {
  border-color: '.$custom_color.';
}
.navbar-brand,
.navbar-brand:hover,
.navbar-brand:focus,
.navbar-brand:visited,
.navbar-brand:active {
  border-top-color: '.$custom_color.';
}
.nav-wrapper-brand,
.nav-close,
.nav-close:hover,
.nav-close:visited,
.nav-close:active,
.nav-close:focus {
  color: '.$custom_color.';
}
.nav li:not(.active) > a > span .tl:before,
.nav li:not(.active) > a > span .tl:after,
.nav li:not(.active) > a > span .br:before,
.nav li:not(.active) > a > span .br:after {
  background-color: '.$custom_color.';
}
.nav > li > ul,
.nav ul ul {
  border-color: '.$custom_color.';
}
.nav ul li > a > span:before {
  background-color: '.$custom_color.';
}
nav li.node:before {
  border-left-color: '.$custom_color.';
}
/* Hero */
.cover .one,
.cover .two {
  border-color: '.$custom_color.';
}
.hero-heading:before,
.hero-heading:after,
.hero-heading .tl,
.hero-heading .tr,
.hero-heading .br,
.hero-heading .bl {
  border-color: '.$custom_color.';
}
.hero-amp {
  color: '.$custom_color.';
}
.hero-amp:before,
.hero-amp:after {
  background-color: '.$custom_color.';
}
/* Lists */
.list li .bullet {
  border-color: '.$custom_color.';
}
/* Comments */
.datetime {
  background-color: '.$custom_color.';
}
.datetime:before {
  border-right-color: '.$custom_color.';
}
/* Skill bars */
.skill-bar .bar {
  border-color: '.$custom_color.';
}
.skill-bar .bar:before,
.skill-bar .bar:after,
.skill-bar .fill,
.skill-bar .fill:before,
.skill-bar .fill:after,
.skill-bar .value {
  background-color: '.$custom_color.';
}
.skill-bar .value:after {
  border-top-color: '.$custom_color.';
}
/* Footer label */
.footer-label {
  color: '.$custom_color.';
}
/* History list */
.history,
.history .work-edu-icon {
  border-color: '.$custom_color.';
}
.history .work-edu-icon .fa {
  color: '.$custom_color.';
}
/* Portfolio styles */
.portfolio .item .overlay {
  background-color: transparent;
}
.portfolio .item:hover .overlay {
  background-color: rgba(198, 190, 154, 0.5);
}
.portfolio .item .overlay .tile {
  background-color: '.$custom_color.';
}
/* Blog post styles */
.blog-post .info,
.blog-post-small .info,
.blog-post-big .info {
  background-color: '.$custom_color.';
}
.blog-post .info .arrow,
.blog-post-small .info .arrow,
.blog-post-big .info .arrow {
  border-top-color: '.$custom_color.';
}
@media screen and (min-width: 992px) {
  .blog-post.on-the-left .info .arrow {
    border-left-color: '.$custom_color.';
  }
  .blog-post.on-the-right .info .arrow {
    border-right-color: '.$custom_color.';
  }
}
/* Expandable section */
.expandable:before {
  border-top-color: '.$custom_color.';
}
/* Diamond */
.diamond .background {
  background-color: '.$custom_color.';
}
/* Author */
.author {
  background-color: '.$custom_color.';
}
/* Iconed */
.iconed .iconed-icon {
  color: '.$custom_color.';
}
/* Flickr widget */
.flickr-widget-item a .hover {
  background-color: '.$custom_color.';
}
/* Testimonials */
.testimonials-box {
  background-color: '.$custom_color.';
}
.testimonials-arrow-left {
  border-top-color: '.$custom_color.';
  border-right-color: '.$custom_color.';
}
.testimonials-arrow-right {
  border-top-color: '.$custom_color.';
  border-left-color: '.$custom_color.';
}
element.style {
}
a:hover, footer .inner .widget_contact_info li i, .blog-article h1 a:hover, aside ul li:hover a, .blog-article .info ul.shares li:hover i, .dark .services_medium_new i, .dark .services_medium_new a, .dark .services_medium_new h6, .services_medium_new h6 a:hover, .recent_news .news-carousel-item dl .info, .services_medium_box h5 a, .services_medium_box .read_m, .services_medium_left dl dt .icon_wrapper i, .services_medium_left dl dd > a, .services_medium:hover i, .services_small .services_small_container .services_small_icon i, .dark .dynamic_page_header i, .one-staff .social_widget ul li:hover i, .light .services_small dt i, .single_testimonial .content .data h6, .star-rating span, ul.products .product .price, #woocommerce .product .summary .price, .woocommerce .product .summary .price, .right_search i:hover, .swiper-slide.blog-article .content a:hover, .contact_info .social ul li a:hover, .single_testimonial .content span {
    color: '.$custom_color.';
}
a:hover, footer .inner .widget_contact_info li i, .blog-article h1 a:hover, aside ul li:hover a, .blog-article .info ul.shares li:hover i, .dark .services_medium_new i, .dark .services_medium_new a, .dark .services_medium_new h6, .services_medium_new h6 a:hover, .recent_news .news-carousel-item dl .info, .services_medium_box h5 a, .services_medium_box .read_m, .services_medium_left dl dt .icon_wrapper i, .services_medium_left dl dd > a, .services_medium:hover i, .services_small .services_small_container .services_small_icon i, .dark .dynamic_page_header i, .one-staff .social_widget ul li:hover i, .light .services_small dt i, .single_testimonial .content .data h6, .star-rating span, ul.products .product .price, #woocommerce .product .summary .price, .woocommerce .product .summary .price, .right_search i:hover, .swiper-slide.blog-article .content a:hover, .contact_info .social ul li a:hover, .single_testimonial .content span,header .right_search i,.shares li a:hover, .blog-article .info > li i,.services_boxed .icon_wrapper i,.services_boxed .readmore,.portfolio_big_title, .line_under_full .read_1,.dl-horizontal.list dt .circle i,.widget #wp-calendar a,.top_nav .widget ul li a:hover,#portfolio-filter ul li a{
    color: '.$custom_color.';
}
.line_under .line_center,.recent_news .month_div,.skill .prog, .contact_form input[type="submit"],.services_boxed:hover .icon_wrapper i,.services_boxed .readmore:hover,.center-bar .btn-system:hover,footer .tagcloud a:hover, .footer_social_bar, .blog-article dt .date.box, #portfolio-filter ul li.active, #faq-filter ul li:hover, #faq-filter ul li.active, #portfolio-filter ul li:hover, .portfolio-item .link:hover,#blogmasonry .readm:hover, .load_more_pagination .load_new {
    background: '.$custom_color.';
}
nav .menu > li.current-menu-item, nav .menu > li:hover, nav .menu > li.current-menu-parent, nav .menu > li.current_page_ancestor, nav .menu > li.current-menu-ancestor {
    border-bottom: 4px solid '.$custom_color.';
}
.services_boxed .readmore:hover {
    border: 2px solid '.$custom_color.';
}
.accordion .accordion-heading.in_head,.full_testimonials {
    border-top: 2px solid '.$custom_color.';
}
#faq-filter ul li:hover, #faq-filter ul li.active {
    border-right: 1px solid '.$custom_color.';
}
.contact_form input[type="submit"] {
    border: 2px solid '.$custom_color.' !important;
}
.contact_form input[type="submit"]:hover {
    background: '.$custom_color.';
}
ul.products li.product:hover,.cart-content .links li {
    border: 1px solid '.$custom_color.';
}
aside ul li:hover, aside #popular_widget dl:hover {
    border-bottom: 1px solid '.$custom_color.';
}
            ';
    return $css;
}